/*********************\
* Author:Dzlua
* QQ:505544956
* Time:2017/04/15
\**********************/
#include "LuaList.h"

#define CObjPtr ((CListUI*)m_cobj)

namespace DuiLib {

bool LuaList::GetScrollSelect()
{
    return CObjPtr->GetScrollSelect();
}

void LuaList::SetScrollSelect(bool bScrollSelect)
{
    CObjPtr->SetScrollSelect(bScrollSelect);
}

int LuaList::GetCurSel()
{
    return CObjPtr->GetCurSel();
}

int LuaList::GetCurSelActivate()
{
    return CObjPtr->GetCurSelActivate();
}

int LuaList::SelectItem(LuaState *L)
{
    LuaStack args(L);
    bool bRet = false;
    int iIndex = LuaHelperNS::GetInt(args[2]);
    bool bTakeFocus = LuaHelperNS::GetBool(args[3], false);
    bRet = CObjPtr->SelectItem(iIndex, bTakeFocus);
    L->PushBoolean(bRet);
    return 1;
}

bool LuaList::SelectItemActivate(int iIndex)
{
    return CObjPtr->SelectItemActivate(iIndex);
}

int LuaList::SelectMultiItem(LuaState *L)
{
    LuaStack args(L);
    bool bRet = false;
    int iIndex = LuaHelperNS::GetInt(args[2]);
    bool bTakeFocus = LuaHelperNS::GetBool(args[3], false);
    bRet = CObjPtr->SelectMultiItem(iIndex, bTakeFocus);
    L->PushBoolean(bRet);
    return 1;
}

void LuaList::SetMultiSelect(bool bMultiSel)
{
    CObjPtr->SetMultiSelect(bMultiSel);
}

bool LuaList::IsMultiSelect()
{
    return CObjPtr->IsMultiSelect();
}

int LuaList::UnSelectItem(LuaState *L)
{
    LuaStack args(L);
    bool bRet = false;
    int iIndex = LuaHelperNS::GetInt(args[2]);
    bool bOthers = LuaHelperNS::GetBool(args[3], false);
    bRet = CObjPtr->UnSelectItem(iIndex, bOthers);
    L->PushBoolean(bRet);
    return 1;
}

void LuaList::SelectAllItems()
{
    CObjPtr->SelectAllItems();
}

void LuaList::UnSelectAllItems()
{
    CObjPtr->UnSelectAllItems();
}

int LuaList::GetSelectItemCount()
{
    return CObjPtr->GetSelectItemCount();
}

int LuaList::GetNextSelItem(int nItem)
{
    return CObjPtr->GetNextSelItem(nItem);
}

int LuaList::GetHeader(LuaState *L)
{
    CListHeaderUI* ctrl = CObjPtr->GetHeader();
    LuaHelperNS::PushCObj(L, ctrl);
    return 1;
}

int LuaList::GetList(LuaState *L)
{
    CContainerUI* ctrl = CObjPtr->GetList();
    LuaHelperNS::PushCObj(L, ctrl);
    return 1;
}

UINT LuaList::GetListType()
{
    return CObjPtr->GetListType();
}

int LuaList::GetItemAt(LuaState *L)
{
    LuaStack args(L);
    int iIndex = LuaHelperNS::GetInt(args[2]);
    CControlUI* ctrl = CObjPtr->GetItemAt(iIndex);
    LuaHelperNS::PushCObj(L, ctrl);
    return 1;
}

int LuaList::GetItemIndex(LuaState *L)
{
    LuaStack args(L);
    int iRet = -1;
    CControlUI* ctrl = (CControlUI*)LuaHelperNS::GetCObjectData(args[2]);
    iRet = CObjPtr->GetItemIndex(ctrl);
    L->PushInteger(iRet);
    return 1;
}

int LuaList::SetItemIndex(LuaState *L)
{
    LuaStack args(L);
    bool bRet = false;
    if (args[3].IsInteger()) {
        CControlUI* ctrl = (CControlUI*)LuaHelperNS::GetCObjectData(args[2]);
        bRet = CObjPtr->SetItemIndex(ctrl, args[3].GetInteger());
    }
    L->PushBoolean(bRet);
    return 1;
}

int LuaList::GetCount()
{
    return CObjPtr->GetCount();
}

int LuaList::Add(LuaState *L)
{
    LuaStack args(L);
    bool bRet = false;
    CControlUI* ctrl = (CControlUI*)LuaHelperNS::GetCObjectData(args[2]);
    bRet = CObjPtr->Add(ctrl);
    L->PushBoolean(bRet);
    return 1;
}

int LuaList::AddAt(LuaState *L)
{
    LuaStack args(L);
    bool bRet = false;
    if (args[3].IsInteger()) {
        CControlUI* ctrl = (CControlUI*)LuaHelperNS::GetCObjectData(args[2]);
        bRet = CObjPtr->AddAt(ctrl, args[3].GetInteger());
    }
    L->PushBoolean(bRet);
    return 1;
}

int LuaList::Remove(LuaState *L)
{
    LuaStack args(L);
    bool bRet = false;
    CControlUI* ctrl = (CControlUI*)LuaHelperNS::GetCObjectData(args[2]);
    bRet = CObjPtr->Remove(ctrl);
    L->PushBoolean(bRet);
    return 1;
}

bool LuaList::RemoveAt(int iIndex)
{
    return CObjPtr->RemoveAt(iIndex);
}

void LuaList::RemoveAll()
{
    CObjPtr->RemoveAll();
}

void LuaList::EnsureVisible(int iIndex)
{
    CObjPtr->EnsureVisible(iIndex);
}

void LuaList::Scroll(int dx, int dy)
{
    CObjPtr->Scroll(dx, dy);
}

bool LuaList::IsDelayedDestroy()
{
    return CObjPtr->IsDelayedDestroy();
}

void LuaList::SetDelayedDestroy(bool bDelayed)
{
    CObjPtr->SetDelayedDestroy(bDelayed);
}

int LuaList::GetChildPadding()
{
    return CObjPtr->GetChildPadding();
}

void LuaList::SetChildPadding(int iPadding)
{
    CObjPtr->SetChildPadding(iPadding);
}

void LuaList::SetItemFont(int index)
{
    CObjPtr->SetItemFont(index);
}

void LuaList::SetItemTextStyle(UINT uStyle)
{
    CObjPtr->SetItemTextStyle(uStyle);
}

int LuaList::SetItemTextPadding(LuaState *L)
{
    LuaStack args(L);
    RECT rc = LuaHelperNS::GetRect(args[2]);
    CObjPtr->SetItemTextPadding(rc);
    return 0;
}

void LuaList::SetItemTextColor(DWORD dwTextColor)
{
    CObjPtr->SetItemTextColor(dwTextColor);
}

void LuaList::SetItemBkColor(DWORD dwBkColor)
{
    CObjPtr->SetItemBkColor(dwBkColor);
}

int LuaList::SetItemBkImage(LuaState *L)
{
    LuaStack args(L);
    SDTString str = LuaHelperNS::GetTString(args[2]);
    CObjPtr->SetItemBkImage(str.c_str());
    return 0;
}

void LuaList::SetAlternateBk(bool bAlternateBk)
{
    CObjPtr->SetAlternateBk(bAlternateBk);
}

void LuaList::SetSelectedItemTextColor(DWORD dwTextColor)
{
    CObjPtr->SetSelectedItemTextColor(dwTextColor);
}

void LuaList::SetSelectedItemBkColor(DWORD dwBkColor)
{
    CObjPtr->SetSelectedItemBkColor(dwBkColor);
}

int LuaList::SetSelectedItemImage(LuaState *L)
{
    LuaStack args(L);
    SDTString str = LuaHelperNS::GetTString(args[2]);
    CObjPtr->SetSelectedItemImage(str.c_str());
    return 0;
}

void LuaList::SetHotItemTextColor(DWORD dwTextColor)
{
    CObjPtr->SetHotItemTextColor(dwTextColor);
}

void LuaList::SetHotItemBkColor(DWORD dwBkColor)
{
    CObjPtr->SetHotItemBkColor(dwBkColor);
}

int LuaList::SetHotItemImage(LuaState *L)
{
    LuaStack args(L);
    SDTString str = LuaHelperNS::GetTString(args[2]);
    CObjPtr->SetHotItemImage(str.c_str());
    return 0;
}

void LuaList::SetDisabledItemTextColor(DWORD dwTextColor)
{
    CObjPtr->SetDisabledItemTextColor(dwTextColor);
}

void LuaList::SetDisabledItemBkColor(DWORD dwBkColor)
{
    CObjPtr->SetDisabledItemBkColor(dwBkColor);
}

int LuaList::SetDisabledItemImage(LuaState *L)
{
    LuaStack args(L);
    SDTString str = LuaHelperNS::GetTString(args[2]);
    CObjPtr->SetDisabledItemImage(str.c_str());
    return 0;
}

void LuaList::SetItemLineColor(DWORD dwLineColor)
{
    CObjPtr->SetItemLineColor(dwLineColor);
}

void LuaList::SetItemShowRowLine(bool bShowLine)
{
    CObjPtr->SetItemShowRowLine(bShowLine);
}

void LuaList::SetItemShowColumnLine(bool bShowLine)
{
    CObjPtr->SetItemShowColumnLine(bShowLine);
}

bool LuaList::IsItemShowHtml()
{
    return CObjPtr->IsItemShowHtml();
}

void LuaList::SetItemShowHtml(bool bShowHtml)
{
    CObjPtr->SetItemShowHtml(bShowHtml);
}

int LuaList::GetItemTextPadding(LuaState *L)
{
    RECT rc = CObjPtr->GetItemTextPadding();
    LuaHelperNS::PushRect(L, rc);
    return 1;
}

DWORD LuaList::GetItemTextColor()
{
    return CObjPtr->GetItemTextColor();
}

DWORD LuaList::GetItemBkColor()
{
    return CObjPtr->GetItemBkColor();
}

int LuaList::GetItemBkImage(LuaState *L)
{
    LuaStack args(L);
    SDTString str = CObjPtr->GetItemBkImage();
    LuaHelperNS::PushTString(L, str);
    return 1;
}

bool LuaList::IsAlternateBk()
{
    return CObjPtr->IsAlternateBk();
}

DWORD LuaList::GetSelectedItemTextColor()
{
    return CObjPtr->GetSelectedItemTextColor();
}

DWORD LuaList::GetSelectedItemBkColor()
{
    return CObjPtr->GetSelectedItemBkColor();
}

int LuaList::GetSelectedItemImage(LuaState *L)
{
    LuaStack args(L);
    SDTString str = CObjPtr->GetSelectedItemImage();
    LuaHelperNS::PushTString(L, str);
    return 1;
}

DWORD LuaList::GetHotItemTextColor()
{
    return CObjPtr->GetHotItemTextColor();
}

DWORD LuaList::GetHotItemBkColor()
{
    return CObjPtr->GetHotItemBkColor();
}

int LuaList::GetHotItemImage(LuaState *L)
{
    LuaStack args(L);
    SDTString str = CObjPtr->GetHotItemImage();
    LuaHelperNS::PushTString(L, str);
    return 1;
}

DWORD LuaList::GetDisabledItemTextColor()
{
    return CObjPtr->GetDisabledItemTextColor();
}

DWORD LuaList::GetDisabledItemBkColor()
{
    return CObjPtr->GetDisabledItemBkColor();
}

int LuaList::GetDisabledItemImage(LuaState *L)
{
    LuaStack args(L);
    SDTString str = CObjPtr->GetDisabledItemImage();
    LuaHelperNS::PushTString(L, str);
    return 1;
}

DWORD LuaList::GetItemLineColor()
{
    return CObjPtr->GetItemLineColor();
}

void LuaList::SetMultiExpanding(bool bMultiExpandable)
{
    CObjPtr->SetMultiExpanding(bMultiExpandable);
}

int LuaList::GetExpandedItem()
{
    return CObjPtr->GetExpandedItem();
}

bool LuaList::ExpandItem(int iIndex, bool bExpand)
{
    return CObjPtr->ExpandItem(iIndex, bExpand);
}

int LuaList::SetPos(LuaState *L)
{
    LuaStack args(L);
    RECT rc = LuaHelperNS::GetRect(args[2]);
    bool bNeedInvalidate = LuaHelperNS::GetBool(args[3], true);
    CObjPtr->SetPos(rc, bNeedInvalidate);
    return 0;
}

int LuaList::Move(LuaState *L)
{
    LuaStack args(L);
    SIZE sz = LuaHelperNS::GetSize(args[2]);
    bool bNeedInvalidate = LuaHelperNS::GetBool(args[3], true);
    CObjPtr->Move(sz, bNeedInvalidate);
    return 0;
}

int LuaList::GetScrollPos(LuaState *L)
{
    SIZE sz = CObjPtr->GetScrollPos();
    LuaHelperNS::PushSize(L, sz);
    return 1;
}

int LuaList::GetScrollRange(LuaState *L)
{
    SIZE sz = CObjPtr->GetScrollPos();
    LuaHelperNS::PushSize(L, sz);
    return 1;
}

int LuaList::SetScrollPos(LuaState *L)
{
    LuaStack args(L);
    SIZE sz = LuaHelperNS::GetSize(args[2]);
    bool bMsg = LuaHelperNS::GetBool(args[3], true);
    CObjPtr->SetScrollPos(sz, bMsg);
    return 0;
}

void LuaList::LineUp()
{
    CObjPtr->LineUp();
}

void LuaList::LineDown()
{
    CObjPtr->LineDown();
}

void LuaList::PageUp()
{
    CObjPtr->PageUp();
}

void LuaList::PageDown()
{
    CObjPtr->PageDown();
}

void LuaList::HomeUp()
{
    CObjPtr->HomeUp();
}

void LuaList::EndDown()
{
    CObjPtr->EndDown();
}

void LuaList::LineLeft()
{
    CObjPtr->LineLeft();
}

void LuaList::LineRight()
{
    CObjPtr->LineRight();
}

void LuaList::PageLeft()
{
    CObjPtr->PageLeft();
}

void LuaList::PageRight()
{
    CObjPtr->PageRight();
}

void LuaList::HomeLeft()
{
    CObjPtr->HomeLeft();
}

void LuaList::EndRight()
{
    CObjPtr->EndRight();
}

void LuaList::EnableScrollBar(bool bEnableVertical, bool bEnableHorizontal)
{
    CObjPtr->EnableScrollBar(bEnableVertical, bEnableHorizontal);
}

int LuaList::GetVerticalScrollBar(LuaState *L)
{
    CScrollBarUI* ctrl = CObjPtr->GetVerticalScrollBar();
    LuaHelperNS::PushCObj(L, ctrl);
    return 1;
}

int LuaList::GetHorizontalScrollBar(LuaState *L)
{
    CScrollBarUI* ctrl = CObjPtr->GetHorizontalScrollBar();
    LuaHelperNS::PushCObj(L, ctrl);
    return 1;
}

BOOL LuaList::CheckColumEditable(int nColum)
{
    return CObjPtr->CheckColumEditable(nColum);
}

int LuaList::GetEditUI(LuaState *L)
{
    CEditUI* ctrl = CObjPtr->GetEditUI();
    LuaHelperNS::PushCObj(L, ctrl);
    return 1;
}

BOOL LuaList::CheckColumComboBoxable(int nColum)
{
    return CObjPtr->CheckColumComboBoxable(nColum);
}

int LuaList::GetComboBoxUI(LuaState *L)
{
    CComboBoxUI* ctrl = CObjPtr->GetComboBoxUI();
    LuaHelperNS::PushCObj(L, ctrl);
    return 1;
}

SDLUA_BEGIN_REGISTER(LuaList, List, VerticalLayout)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetScrollSelect, GetScrollSelect)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetScrollSelect, SetScrollSelect)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetCurSel, GetCurSel)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetCurSelActivate, GetCurSelActivate)
    SDLUA_REGISTER_FUN_LUA(LuaList, SelectItem, SelectItem)
    SDLUA_REGISTER_FUN_CPP(LuaList, SelectItemActivate, SelectItemActivate)

    SDLUA_REGISTER_FUN_LUA(LuaList, SelectMultiItem, SelectMultiItem)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetMultiSelect, SetMultiSelect)
    SDLUA_REGISTER_FUN_CPP(LuaList, IsMultiSelect, IsMultiSelect)
    SDLUA_REGISTER_FUN_LUA(LuaList, UnSelectItem, UnSelectItem)
    SDLUA_REGISTER_FUN_CPP(LuaList, SelectAllItems, SelectAllItems)
    SDLUA_REGISTER_FUN_CPP(LuaList, UnSelectAllItems, UnSelectAllItems)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetSelectItemCount, GetSelectItemCount)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetNextSelItem, GetNextSelItem)

    SDLUA_REGISTER_FUN_LUA(LuaList, GetHeader, GetHeader)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetList, GetList)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetListType, GetListType)

    SDLUA_REGISTER_FUN_LUA(LuaList, GetItemAt, GetItemAt)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetItemIndex, GetItemIndex)
    SDLUA_REGISTER_FUN_LUA(LuaList, SetItemIndex, SetItemIndex)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetCount, GetCount)
    SDLUA_REGISTER_FUN_LUA(LuaList, Add, Add)
    SDLUA_REGISTER_FUN_LUA(LuaList, AddAt, AddAt)
    SDLUA_REGISTER_FUN_LUA(LuaList, Remove, Remove)
    SDLUA_REGISTER_FUN_CPP(LuaList, RemoveAt, RemoveAt)
    SDLUA_REGISTER_FUN_CPP(LuaList, RemoveAll, RemoveAll)

    SDLUA_REGISTER_FUN_CPP(LuaList, EnsureVisible, EnsureVisible)
    SDLUA_REGISTER_FUN_CPP(LuaList, Scroll, Scroll)

    SDLUA_REGISTER_FUN_CPP(LuaList, IsDelayedDestroy, IsDelayedDestroy)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetDelayedDestroy, SetDelayedDestroy)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetChildPadding, GetChildPadding)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetChildPadding, SetChildPadding)

    SDLUA_REGISTER_FUN_CPP(LuaList, SetItemFont, SetItemFont)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetItemTextStyle, SetItemTextStyle)
    SDLUA_REGISTER_FUN_LUA(LuaList, SetItemTextPadding, SetItemTextPadding)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetItemTextColor, SetItemTextColor)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetItemBkColor, SetItemBkColor)
    SDLUA_REGISTER_FUN_LUA(LuaList, SetItemBkImage, SetItemBkImage)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetAlternateBk, SetAlternateBk)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetSelectedItemTextColor, SetSelectedItemTextColor)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetSelectedItemBkColor, SetSelectedItemBkColor)
    SDLUA_REGISTER_FUN_LUA(LuaList, SetSelectedItemImage, SetSelectedItemImage)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetHotItemTextColor, SetHotItemTextColor)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetHotItemBkColor, SetHotItemBkColor)
    SDLUA_REGISTER_FUN_LUA(LuaList, SetHotItemImage, SetHotItemImage)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetDisabledItemTextColor, SetDisabledItemTextColor)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetDisabledItemBkColor, SetDisabledItemBkColor)
    SDLUA_REGISTER_FUN_LUA(LuaList, SetDisabledItemImage, SetDisabledItemImage)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetItemLineColor, SetItemLineColor)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetItemShowRowLine, SetItemShowRowLine)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetItemShowColumnLine, SetItemShowColumnLine)
    SDLUA_REGISTER_FUN_CPP(LuaList, IsItemShowHtml, IsItemShowHtml)
    SDLUA_REGISTER_FUN_CPP(LuaList, SetItemShowHtml, SetItemShowHtml)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetItemTextPadding, GetItemTextPadding)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetItemTextColor, GetItemTextColor)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetItemBkColor, GetItemBkColor)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetItemBkImage, GetItemBkImage)
    SDLUA_REGISTER_FUN_CPP(LuaList, IsAlternateBk, IsAlternateBk)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetSelectedItemTextColor, GetSelectedItemTextColor)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetSelectedItemBkColor, GetSelectedItemBkColor)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetSelectedItemImage, GetSelectedItemImage)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetHotItemTextColor, GetHotItemTextColor)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetHotItemBkColor, GetHotItemBkColor)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetHotItemImage, GetHotItemImage)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetDisabledItemTextColor, GetDisabledItemTextColor)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetDisabledItemBkColor, GetDisabledItemBkColor)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetDisabledItemImage, GetDisabledItemImage)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetItemLineColor, GetItemLineColor)
    
    SDLUA_REGISTER_FUN_CPP(LuaList, SetMultiExpanding, SetMultiExpanding)
    SDLUA_REGISTER_FUN_CPP(LuaList, GetExpandedItem, GetExpandedItem)
    SDLUA_REGISTER_FUN_CPP(LuaList, ExpandItem, ExpandItem)
    
    SDLUA_REGISTER_FUN_LUA(LuaList, SetPos, SetPos)
    SDLUA_REGISTER_FUN_LUA(LuaList, Move, Move)

    SDLUA_REGISTER_FUN_LUA(LuaList, GetScrollPos, GetScrollPos)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetScrollRange, GetScrollRange)
    SDLUA_REGISTER_FUN_LUA(LuaList, SetScrollPos, SetScrollPos)
    SDLUA_REGISTER_FUN_CPP(LuaList, LineUp, LineUp)
    SDLUA_REGISTER_FUN_CPP(LuaList, LineDown, LineDown)
    SDLUA_REGISTER_FUN_CPP(LuaList, PageUp, PageUp)
    SDLUA_REGISTER_FUN_CPP(LuaList, PageDown, PageDown)
    SDLUA_REGISTER_FUN_CPP(LuaList, HomeUp, HomeUp)
    SDLUA_REGISTER_FUN_CPP(LuaList, EndDown, EndDown)
    SDLUA_REGISTER_FUN_CPP(LuaList, LineLeft, LineLeft)
    SDLUA_REGISTER_FUN_CPP(LuaList, LineRight, LineRight)
    SDLUA_REGISTER_FUN_CPP(LuaList, PageLeft, PageLeft)
    SDLUA_REGISTER_FUN_CPP(LuaList, PageRight, PageRight)
    SDLUA_REGISTER_FUN_CPP(LuaList, HomeLeft, HomeLeft)
    SDLUA_REGISTER_FUN_CPP(LuaList, EndRight, EndRight)
    SDLUA_REGISTER_FUN_CPP(LuaList, EnableScrollBar, EnableScrollBar)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetVerticalScrollBar, GetVerticalScrollBar)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetHorizontalScrollBar, GetHorizontalScrollBar)
    
    SDLUA_REGISTER_FUN_CPP(LuaList, CheckColumEditable, CheckColumEditable)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetEditUI, GetEditUI)

    SDLUA_REGISTER_FUN_CPP(LuaList, CheckColumComboBoxable, CheckColumComboBoxable)
    SDLUA_REGISTER_FUN_LUA(LuaList, GetComboBoxUI, GetComboBoxUI)

SDLUA_END_REGISTER

SDLUA_BEGIN_UNREGISTER(LuaList, List)
SDLUA_END_UNREGISTER(List)

}

#undef CObjPtr